DataIF = {

    /**************************************************************************************
    ** Cac Function goi API tren Service
    **************************************************************************************/

    /**
    * Function get data de tao menu<br>
    * Date 2013.01.14<br>
    *
    * @author Tien-HV
    * @version 1.0
    * @param callback: funciton(Json: data return, String: error message)
    */
    getMenu: function (callback) {
        var errorMsg = "";

        //Set paremeter cho function truyen len service
        Comm.requestData = JSON.stringify({});

        Comm.httpConnect(
        //URL cua function GetMenu tren service
                    Comm.BASE_SERVICE_URL + "GetMenu",
        //Success callback function
                    function () {
                        if (Comm.responseData == null) {
                            errorMsg = "NO_DATA";
                        }
                        callback(Comm.responseData, errorMsg);
                    },
        //Error callback function
                    function () {
                        errorMsg = "NETWORK_ERROR";
                        callback(null, errorMsg);
                    }
            );
    },


    getProductList: function (categoryCode, manufactoryCode, callback) { 
        var errorMsg = "";

        //Set paremeter cho function truyen len service
        Comm.requestData = JSON.stringify({"categoryCode": categoryCode, "manufactoryCode": manufactoryCode });

        Comm.httpConnect(
        //URL cua function GetMenu tren service
                    Comm.BASE_SERVICE_URL + "GetProductList",
        //Success callback function
                    function () {
                        if (Comm.responseData == null) {
                            errorMsg = "NO_DATA";
                        }
                        callback(Comm.responseData, errorMsg);
                    },
        //Error callback function
                    function () {
                        errorMsg = "NETWORK_ERROR";
                        callback(null, errorMsg);
                    }
            );
    },



}// end DataIF




